package cn.edu.hubu.hubuhotel.mapper;

import cn.edu.hubu.hubuhotel.entity.Room;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoomMapper {
    /**
     * 插入数据操作
     * @param room
     * @return
     */
    public int insertRoom(Room room);
    /**
     * 通过roomId更新数据
     * @param room
     * @return
     */
    public int updateRoom(Room room);

    /**
     * 删除操作
     * @param roomId
     * @return
     */
    public int deleteRoom(int roomId);

    /**
     * 通过roomId查询房间信息
     * @param roomId
     * @return
     */
    public Room selectbyroomId(int roomId);

    /**
     * 通过价格查询房间信息
     * @param price
     * @return
     */
    public List<Room> selectroombyprice(int price);

    public List<Room> selectroombyTypeId(int roomTypeId);

    public Room selectRoomall(@Param("roomId") int roomId, @Param("price") int price, @Param("roomTypeId") int roomTypeId);

    public int updateRoomState(@Param("roomId") int roomId, @Param("state") int state);

    public List<Room> searchroom();
}
